﻿using AutoMapper;
using FFLTask.BLL.Entity;
using FFLTask.SRV.ViewModel.Task;
using FFLTask.SRV.ProdService.ViewModelMap.Helper;

namespace FFLTask.SRV.ViewModelMap.TaskMapAuto
{
    internal class _NodeTypeModelMap
    {
        internal static void init()
        {
            Mapper.CreateMap<Task, _NodeTypeModel>()
                .ForMember(m => m.HasChild, opt => opt.MapFrom(t => t.Children.Count > 0))
                .IgnoreAllNonExisting()
                ;
        }
    }
}
